<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions" 
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
  targetNamespace="Examples">
  
  <process id="receiveTask" isExecutable="true">
  
    <extensionElements>
      <camunda:executionListener class="org.camunda.bpm.engine.test.standalone.history.VariableUpdateExecutionListener" event="start">
        <camunda:field name="varName" stringValue="zVar1" />
      </camunda:executionListener>
    </extensionElements>
  
    <startEvent id="theStart" />
    
    <sequenceFlow id="flow1" sourceRef="theStart" targetRef="serviceTask">
      <extensionElements>
        <camunda:executionListener class="org.camunda.bpm.engine.test.standalone.history.VariableUpdateExecutionListener">
          <camunda:field name="varName" stringValue="zVar2" />
        </camunda:executionListener>
      </extensionElements>
    </sequenceFlow>

    <serviceTask id="serviceTask" camunda:class="org.camunda.bpm.engine.test.standalone.history.VariableUpdateDelegate">
      <extensionElements>
        <camunda:executionListener class="org.camunda.bpm.engine.test.standalone.history.VariableUpdateExecutionListener" event="start">
          <camunda:field name="varName" stringValue="zVar3" />
        </camunda:executionListener>
        <camunda:executionListener class="org.camunda.bpm.engine.test.standalone.history.VariableUpdateExecutionListener" event="end">
          <camunda:field name="varName" stringValue="zVar4" />
        </camunda:executionListener>
      </extensionElements>
    </serviceTask>
    
    <sequenceFlow id="flow2" sourceRef="serviceTask" targetRef="waitState" />
    
    <receiveTask id="waitState" name="Wait State" />
    
    <sequenceFlow id="flow3" sourceRef="waitState" targetRef="theEnd" />
    
    <endEvent id="theEnd" />
    
  </process>

</definitions>